/**
 * @author rakoon
 */
function findPartidas(){
  var win = new Window({id: "win2", className: "bluelighting", title: "Busqueda de Partidas", url: "/scm/McpRegistros/getPartidas", okLabel: 'Aceptar', width:460, height:270,maximizable: false, resizable: false, minimizable: false, draggable:false}); 
  //win.getContent().innerHTML = "<div id=\"login\">  <div style=\"clear:both\"></div> <p><span class=\"login_label\">login</span> <span class=\"login_input\"><input type=\"text\" name=\"username\" /></span></p> <div style=\"clear:both\"></div> <p><span class=\"login_label\">password</span> <span class=\"login_input\"><input type=\"password\" name=\"password\" /></span></p> <div style=\"clear:both\"></div> </form> <p><span id='login_error_msg' class=\"login_error\" style=\"display:none\">&nbsp;</span></p> </div>"; 
  
  win.setDestroyOnClose();
  win.show(true); 
  win.showCenter();
  win.setConstraint(true, {left:0, right:0, top: 30, bottom:10})
  win.toFront();
}

function agregarP(codigo){
	//alert(codigo);
  var win = new Window({id: "win2", className: "bluelighting", title: "Agregar Partida", url: "/scm/McpRegistros/agregarP/"+codigo, okLabel: 'Aceptar', width:460, height:270,maximizable: false, resizable: false, minimizable: false, draggable:false}); 
  //win.getContent().innerHTML = "<div id=\"login\">  <div style=\"clear:both\"></div> <p><span class=\"login_label\">login</span> <span class=\"login_input\"><input type=\"text\" name=\"username\" /></span></p> <div style=\"clear:both\"></div> <p><span class=\"login_label\">password</span> <span class=\"login_input\"><input type=\"password\" name=\"password\" /></span></p> <div style=\"clear:both\"></div> </form> <p><span id='login_error_msg' class=\"login_error\" style=\"display:none\">&nbsp;</span></p> </div>"; 
  win.setCloseCallback(actualizar);
  win.setDestroyOnClose();
  win.show(true); 
  win.showCenter();
  win.setConstraint(true, {left:0, right:0, top: 30, bottom:10})
  win.toFront();
}

function actualizar(){
	var ejercicio = document.getElementById('McpRegistroAnioFormulacion').value;
	//alert(ejercicio);
	//<![CDATA[
	new Ajax.Updater('imputacion','/scm/McpRegistros/partidasElement/'+ejercicio, {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', 'imputacion']});
	//]]> 
	return true;
}
